var stats = new Stats();
var sts = stats.domElement.style;
sts.position = 'absolute';
sts.top = '0px';
sts.right = '0px';
document.body.appendChild(stats.domElement);

var c = document.getElementById('c'),
    ctx = c.getContext('2d'),
    w = c.width = window.innerWidth * window.devicePixelRatio,
    h = c.height = window.innerHeight * window.devicePixelRatio;
window.addEventListener('resize', handleWindowResize, false);
function handleWindowResize(e) {
    w = c.width = window.innerWidth * window.devicePixelRatio,
    h = c.height = window.innerHeight * window.devicePixelRatio;
}

var target = {
    x: w / 2,
    y: h / 2,
    vx: 0,
    vy: 0,
    a: 0,
    angle: 0,
    r: 25,
    update: function(ctx) {
        this.draw(ctx);  
    },
    draw: function(ctx) {
        ctx.save();
        ctx.fillStyle = 'white';
        ctx.beginPath();
        
        ctx.closePath();
        ctx.fill();
        ctx.restore();
    }
};

//绑定操作事件

//动画函数
(function animate() {
    // requestAnimationFrame(animate);

    ctx.save();
    ctx.fillStyle = '#222';
    ctx.fillRect(0, 0, w, h);
    ctx.restore();

    target.update(ctx);
})();